#打印1-10整数

# num = 1
#
# while num <= 10:
#     print(num)
#     num += 1

#计算1-100的和
# num = 1
# sum = 0
# while num <= 100:
#     sum += num
#     num+=1
#
# print(sum)

#计算5的阶乘
# r = 1
# num = 1
# while num <= 5:
#     r *= num
#     num += 1
# print(r)

#计算 1!+2!+3!+4!+5!
sum = 0
num = 1

while num <= 5:
    result = 1
    i = 1
    while i <= num:
        result *= i
        i+=1

    sum += result
    num += 1
print(f"结果={sum}")



